package my.interview;

import java.util.Arrays;
import java.util.Scanner;

public class Main4 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        // 士兵数量
        int n = scanner.nextInt();
        // 敌军到达时常
        int t = scanner.nextInt();
        // 每个士兵的过河时长
        int[] time = new int[n];

        for (int i = 0; i < n; i++) {
            time[i] = scanner.nextInt();
        }
        String result = getResult(n, t, time);
        System.out.println(result);
    }

    private static String getResult(int n, int t, int[] time) {
        Arrays.sort(time);
        int[] temp = new int[n];
        temp[0] = time[0];
        if (temp[0] > t) {
            return "0 0";
        }
        temp[1] = getMax(time[0], time[1]);
        if (temp[1] > t) {
            return 1 + " " + temp[0];
        }
        for (int i = 2; i < n; i++) {
            temp[i] = Math.min(temp[i - 1] + time[0] + getMax(time[0], time[i]),
                    temp[i - 2] + time[0] + getMax(time[i - 1], time[i]) + time[i] + getMax(time[0], time[1]));
            if (temp[i] > t) {
                return i + " " + temp[i - 1];
            }
        }
        return n + " " + temp[n - 1];
    }

    private static int getMax(int t1, int t2) {
        if (t1 * 10 < t2) {
            return t1 * 10;
        }
        return t2;
    }
}
